package org.cuatrovientos.empirefleet;


/**
 * Represents a generic space_ship
 * @author Sienar Fleet Systems
 * @greets Dani
 */
public class SpaceShip {

	private static final int FAIL = 0;
	private static final int STOPPED = 0;
	protected String pilotName;
	
	int type;
	
	int speed;
	int range;
	int energy;
	
	int x;
	int y;
	int z;
	
	/**
	 * constructor
	 * @param name
	 */
	public SpaceShip (String name) {
		pilotName = name;
	}
	
	/**
	 * constructor
	 * @param typeOfShip
	 */
	public SpaceShip (int type)  {
		this.type = type;
	}
	
	/**
	 * my laser
	 * @return laser damage depending of type
	 */
	public int fireLaser () {
		switch (type) {
			case 0: return 1;
			case 1: return 2;
			case 2: return 3;
			default:return FAIL;
		}
	}
	
	/**
	 * move, more or less depending on type
	 * @return positions
	 */
	public int move () {
		switch (type) {
		case 0: return 1;
		case 1: return 3;
		case 2: return 2;
		default:return STOPPED;
	}
  }
}
